move initialization of OptionInt/Double parameters to constructor (#1364)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 31 Oct 2024 15:41:17 +0000 (09:41 -0600)
committerGitHub <noreply@github.com>
Thu, 31 Oct 2024 15:41:17 +0000 (09:41 -0600)
commit21603ae812f795b9d98bab623cbafc62a7dbc46f
treefda0191d9ff21a9e73b122d2e88c7ed00c992e4e
parentcadbc6ae55910e8cc0c248dcaf2e3426afb762c9
move initialization of OptionInt/Double parameters to constructor (#1364)

* move init of OptionInt/Double parms to ctor

except for id, which isn't known by formats/filters.
Also, move validation of OptionInt/Double strings to Option
class, where it can be maintained in parallel with the conversion
routines.

* init Option id in init_vec, init_filter_vec.

also
fix -Wclazy-unused-non-trivial-variable.
add test of Option error detection.
23 files changed:
arcdist.h
defs.h
filter_vecs.cc
filter_vecs.h
garmin.h
garmin_gpi.h
gdb.h
height.h
interpolate.h
main.cc
option.cc
option.h
ozi.h
position.h
radius.h
reference/badopt1.txt [new file with mode: 0644]
reference/badopt2.txt [new file with mode: 0644]
reference/badopt3.txt [new file with mode: 0644]
reference/badopt4.txt [new file with mode: 0644]
smplrout.h
testo.d/vecs.test [new file with mode: 0644]
vecs.cc
vecs.h